Terminal Messages
The following bit masks specify the messages that the Telephone Manager passes to your application for a given terminal activity. You also use these constants when you callTELTermMsgHand
to specify which messages you want your message handler to receive.When your terminal message handler receives a message, the
hTEL
parameter is a handle to the telephone record associated with the terminal that originated the message. Themsg
parameter is one of the following constants. Theglobals
parameter is the value you specified when you called theTELTermMsgHand
function to register the message handling routine. Themtype
andvalue
parameters vary in meaning according to the message type.
enum { telTermHookMsg = 0x00000001, telTermKeyMsg = 0x00000002, telTermVolMsg = 0x00000004, telTermDisplayMsg = 0x00000008, telTermEnableMsg = 0x00000010, telTermOpenMsg = 0x00000020, telTermCloseMsg = 0x00000040, telTermResetMsg = 0x00000080, telTermErrorMsg = 0x00000100, telTermIndHSStateChgMsg = 0x00000200, telTermIndHSConnectMsg = 0x00000400, telTermKeyImmMsg = 0x00000800, telTermVolStateMsg = 0x00001000, telTermOtherMsg = 0x80000000, telAllTermMsgs = 0x00001fff };Constant descriptions
telTermHookMsg
- Your application receives this message when a hookswitch state associated with a terminal has changed (either because your application called
TELSetHookSw
or because the telephone was physically placed on or off hook). Themtype
parameter is a constant that indicates the type of hookswitch. Thevalue
parameter is a constant that indicates whether the hookswitch state is on or off. See "Hookswitch Types and States" on page 2-11 for a description of the constants you can find in these parameters.telTermKeyMsg
- Your application receives this message when a key on an attached telephone set (either on the telephone keypad or a feature key) has been pressed. This message is queued and then sent to your message handler at system task time. (If keys are selected through software, notification is provided through the applicable directory number and call appearance message handlers.) The
mtype
parameter is a constant indicating which kind of key was pressed. Thevalue
parameter is the ASCII value for the key that was pressed or a constant that indicates a feature key. See "Key Press Constants" on page 5-27 for a description of these constants.telTermVolMsg
- Your application receives this message when a speaker volume level or a microphone sensitivity level has been adjusted for a given terminal (either because your application called
TELSetVolume
orTELAlert
to modify the level, or because a user manually changed a volume setting on the telephone handset). Themtype
parameter is a constant that indicates which volume or sensitivity has been set. Thevalue
parameter is constant that indicates the new level. This parameter is equal totelVolSame
if the level has not been changed, or can have any value fromtelVolMin
totelVolMax
. See "Volume Controls" on page 2-12 for a description of the constants that can be passed in these parameters.telTermDisplayMsg
- Your application receives this message when the display on the telephone terminal has changed. The
mtype
parameter is a constant that indicates the current display mode. Thevalue
parameter is constant that indicates which item in the display has changed. See "Display Modes" on page 2-10 and "Display Items" on page 2-10 for a description of the constants that can be passed in these parameters.telTermEnableMsg
- Your application receives this message whenever the enabled state of a terminal changes. The
mtype
parameter is not used and is always set to 0. Thevalue
parameter is a constant that indicates the state of the connection between a tool and a terminal. See "Terminal States" on page 5-26 for a description of the constants that can be passed in this parameter.telTermOpenMsg
- Your application receives this message when a terminal is successfully opened in response to the
TELOpenTerm
function. Themtype
andvalue
parameters are not used and are always set to 0.telTermCloseMsg
- Your application receives this message when a terminal is shut down in response to the
TELCloseTerm
function. Themtype
andvalue
parameters are not used and are always set to 0.telTermResetMsg
- Your application receives this message when a terminal has been reset in response to the
TELResetTerm
function. Themtype
andvalue
parameters are not used and are always set to 0.telTermErrorMsg
- Your application receives this message when a terminal hardware related error has occurred (for example, the hardware device was disconnected). The
mtype
parameter specifies the error that occurred. See "Terminal Errors" on page 5-26 for a description of the values this parameter can contain. Thevalue
parameter is not used and is always set to 0.telTermIndHSStateChgMsg
- Your application receives this message when there is a change in the independent handset state (either because your application called
TELIndHandsetConnect
or because the independent handset was physically placed on or off hook by the user). Themtype
parameter is a constant that specifies whether the handset is connected to the telephone line. Thevalue
parameter is constant that specifies whether the handset is on-hook or off-hook. These constants are described in "Independent Handset States" on page 2-14.telTermIndHSConnectMsg
- Your application receives this message after an independent handset has been connected or disconnected by the
TELSetIndHSConnect
function. Themtype
parameter is not used and is always set to 0. Thevalue
parameter is constant that specifies whether the handset is connected to the telephone line. These constants are described in "Independent Handset States" on page 2-14.telTermKeyImmMsg
- Your application receives this message when a key on an attached telephone set (either on the telephone keypad or a feature key) has been pressed. This message is sent immediately, not at system task time. (If keys are selected through software, notification is provided through the applicable directory number and call appearance message handlers.) The
mtype
parameter is a constant indicating which kind of key was pressed. Thevalue
parameter is the ASCII value for the key that was pressed or a constant that indicates a feature key. See "Key Press Constants" on page 5-27 for a description of these constants.telTermVolStateMsg
- Your application receives this message when a user mutes a device (such as the handset speaker, handset microphone, or ringer) or turns it back on without changing the volume setting. The
mtype
parameter is a constant that indicates which device has had its volume state changed. Thevalue
parameter is a constant that indicates the new state of the device. See "Volume Controls" on page 2-12 for a description of these constants.telTermOtherMsg
- Your application receives this message when a telephone tool needs to send it some information about the terminal that cannot be provided by the other terminal messages. The values passed in the
mtype
andvalue
parameters are defined by the telephone tool.telAllTermMsgs
- All terminal events except
telTermOtherMsg
.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help